package com.earthchen.domain.dto;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;


/**
 * 更新密码dto
 *
 * @author earthchen
 * @date 2018/10/17
 **/
public class UpdatePasswordDTO
{
    @NotEmpty(message = "旧密码不能为空")
    private String oldPassword;

    @NotEmpty(message = "新密码不能为空")
    @Size(min = 6, max = 20, message = "密码必须在6到20位")
    private String newPassword;

    public String getOldPassword()
    {
        return oldPassword;
    }

    public void setOldPassword(String oldPassword)
    {
        this.oldPassword = oldPassword;
    }

    public String getNewPassword()
    {
        return newPassword;
    }

    @Override
    public String toString()
    {
        return "UpdatePasswordDTO{" +
               "oldPassword='" + oldPassword + '\'' +
               ", newPassword='" + newPassword + '\'' +
               '}';
    }

    public void setNewPassword(String newPassword)
    {
        this.newPassword = newPassword;
    }
}
